-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bit integration docker #23
base: initial-bit-integration
Are you sure you want to change the base?
Bit integration docker #23
Conversation
replace db uri add Flask-Cors to requirements.txt linting with black formatter remove fetch env variables duplication change pull-push branch for github action to bit branch add postgresql test db add shell_context_processor Add -h postgres to psql command Place PGPASSWORD at the start of psql command Add env for running test * Update main.yml (Patch anitab-org#21) Co-authored-by: Aditya Kurkure use non-macOS syntax for db_uri and add db envs Add postgres db url for github action Add test for db_test_uri remove hard coded test db uri Add psycopg2 Fix db type to postgres+psycopg2 add env to Generate coverage report move env to global runner focus pytest cov on tests folder Remove print command
Oops I accidently added another commit as well. I'll rebase the changes. |
53aefc2
to
d897e73
Compare
21a3956
to
163502a
Compare
migrate = Migrate(app, db) | ||
|
||
cors.init_app(app, resources={r"*": {"origins": "http:BIT:5000"}}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use 2 origins? one from docker (this one) and the other one is the localhost:5000 if we run the app locally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use 2 origins? one from docker (this one) and the other one is the localhost:5000 if we run the app locally
Yup I'll add them
if __name__ == "__main__": | ||
# if we use docker then we can also run it on the default 5000 port |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we keep both. So, give options for people who want to run locally as well using port 4000. we can comment that option out when it's not being used.
@@ -3,4 +3,12 @@ COPY ./requirements.txt /dockerBuild/requirements.txt | |||
WORKDIR /dockerBuild | |||
RUN pip install --no-cache-dir -r requirements.txt | |||
COPY . /dockerBuild | |||
ENV DB_TYPE=postgresql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is the same host. Let me see where the POSTGRES_HOST and the POSTGRES_PORT and being used and i'll get back to you , but what I can tell you is that they are connected to the same postgre database.
3ab6260
to
928bbe5
Compare
Description
Added docker files to make setup easier.
Type of Change:
Code/Quality Assurance Only
How Has This Been Tested?
Checklist:
Code/Quality Assurance Only